<html>
<head>
    <script src="jquery.min.js"></script>
    <script src="echarts.js"></script>
    <script src="echarts-util.js"></script>
    <style type="text/css">
        #ec_1,#ec_2,#ec_3,#ec_4,#ec_5,#ec_6,#xiaowenxue {
            display: inline-block;
            width: 240px;
            height: 240px;
            border: 1px solid #000000;
            border-radius: 10px;
        }
    </style>
</head>
<body>
<div id="ec_1"></div>
<div id="ec_2"></div>
<div id="ec_3"></div>
<div id="ec_4"></div>
<div id="ec_5"></div>
<div id="ec_6"></div>
<div id="xiaowenxue"></div>

<script type="text/javascript">
        var data = [
            {group: '类型1', name: '1月', value: 10},
            {group: '类型2', name: '1月', value: 15},
            {group: '类型1', name: '2月', value: 25},
            {group: '类型2', name: '2月', value: 12},
            {group: '类型1', name: '3月', value: 22},
            {group: '类型2', name: '3月', value: 12},
        ];
        var option_pie = MyEcharts.EchartsOption.pie('饼图', '副标题', data)
        MyEcharts.initChart(option_pie, 'ec_1')
        var option_line = MyEcharts.EchartsOption.Line('线图', '副标题', data)
        MyEcharts.initChart(option_line, 'ec_2')
        var option_bar = MyEcharts.EchartsOption.bar('柱图', '副标题', data)
        MyEcharts.initChart(option_bar, 'ec_3')
        var option_radar = MyEcharts.EchartsOption.Radar('雷达图', '副标题', data)
        MyEcharts.initChart(option_radar, 'ec_4')
        var option_funnel = MyEcharts.EchartsOption.Funnel('漏斗图', '副标题', data)
        MyEcharts.initChart(option_funnel, 'ec_5')

        var dataFunnel = {group: '类型1', name: '1月', value: 10}
        var option_gauge = MyEcharts.EchartsOption.Gauge('仪表盘图', '副标题', dataFunnel)
        MyEcharts.initChart(option_gauge, 'ec_6')   


        // 自定义图表样式参数
        var data =  [
            {  name: '男生', value: 10},
            {  name: '女生', value: 20}
        ]
        console.log(1)
        var option = MyEcharts.EchartsOption.pie("男女人数统计", "单位（人）", data)
        var initChart=MyEcharts.initChart(option,"xiaowenxue");//sexId是div的id
        var options = {
            color:["#FDB157","#3498DB"],
            legend : {
                orient: 'vertical', //垂直：vertical； 水平 horizontal
                right:'right',
            },
            series:[{
                radius : '55%', //圆的大小
                center : ['50%', '60%'],//位置居中
            }]
        };
        initChart.setOption(options);
</script>
</body>

</html>
